home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 820 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: How to ... declare a virtual static function in a class ?
  5. Date: 7 Jan 1996 14:23:02 GMT
  6. Organization: Pipeline USA
  7. Message-ID: <4col06$87l@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe4.h1.usa.pipeline.com
  9. X-PipeUser: grantp
  10. X-PipeHub: usa.pipeline.com
  11. X-PipeGCOS: (Pete)
  12. X-Newsreader: Pipeline USA v3.3.0
  13.  
  14. On Jan 07, 1996 12:20:40 in article <How to ... declare a virtual static
  15. function in a class ?>, 'Jean-Pierre Schnyder <jschnyde@worldcom.ch>'
  16. wrote: 
  17.  
  18.  
  19. >I guess this is not possible. Any idea on the rationale about this  
  20. >limitation ?  
  21.  
  22. Correct.  ARM 9.4 states that static member functions can not be 
  23. virtual.  
  24.  
  25. A static member function is not associated with any particular 
  26. instance of a class; therefore, it does not have a 'this' pointer, 
  27. or more seriously, can be called with a null pointer.  See 
  28. "Design & Evolution of C++" by Stroustrup for more info. 
  29.  
  30.  
  31. >--  
  32. >--------------------------------------------------------------------------
  33.  
  34. >Jean-Pierre Schnyder             Software engineer              
  35. >Switzerland 
  36. >. 
  37. -- 
  38.  
  39. Pete
  40.